﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class Index : System.Web.UI.MasterPage
{
    public List<Menu> Listmenu=new List<Menu>();
    MenuController menuControl;

    DataTable dtmenu;
    protected void Page_Load(object sender, EventArgs e)
    {
        menuControl = new MenuController();
        dtmenu = menuControl.getAllMenu();
        LoadMenu();
    }
    public void LoadMenu() {
        foreach (DataRow item in dtmenu.Rows)
        {
            Listmenu.Add(new Menu(item));
        }
    }
}
